import request from '@/utils/request'
function getUrl(url) { return '/api/' + url }

//添加管理员信息
export function addInAdmin(data) {
    return request({
        url: getUrl("admin/admin/addInAdmin"),
        method: 'post',
        data
    })
}

//更新管理员信息
export function updateInAdmin(data) {
    return request({
        url: getUrl("admin/admin/updateInAdmin"),
        method: 'post',
        data
    })
}

export function updatePassword(data) {
    return request({
        url: getUrl("admin/admin/updatePassword"),
        method: 'post',
        data
    })
}

export function updateMobile(data) {
    return request({
        url: getUrl("admin/admin/updateMobile"),
        method: 'post',
        data
    })
}

//修改用户在线状态
export function loginOut() {
    return request({
        url: getUrl("admin/user/loginOut"),
        method: 'get'
    })
}





export function deleteInAdmin(data) {
    return request({
        url: getUrl("admin/admin/deleteInAdmin"),
        method: 'post',
        data
    })
}


//获取管理员信息数据 getInAdminVo
export function getInAdminVo(data) {
    return request({
        url: getUrl("admin/admin/getInAdminVo"),
        method: 'post',
        data
    })
}

//获取管理员详细信息数据 getInAdminVo
export function getInAdminInfo() {
    return request({
        url: getUrl("admin/admin/getInAdminInfo"),
        method: 'get',
    })
}

//获取管理员详细信息数据 getInUserInfo
export function getInUserInfo() {
    return request({
        url: getUrl("admin/user/getInUserInfo"),
        method: 'get',
    })
}